Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use linear filtering without mipmaps for ProceduralSkyMaterial and PhysicalSkyMaterial #74740

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

clayjohn
Copy link
Member

Fixes: #74709

The blurriness at the pole and seam comes from the shader reading from a higher mipmap automatically. Mipmap detection works by measuring the size of the derivative of the UV. I.e. the further away the UV coordinate is from its neighbour, the higher level we can read from. This assumption breaks with panorama coordinates as there is a huge jump on the seam (from 1 to 0) leading to a very high mipmap being used for the pixels on the seam.

PanoramaSkyMaterial never uses mipmaps, but it has the option to enable/disable filtering. We could add the option in the future, but no one has asked for it, so its best to just keep things simple and continue to always use linear

@akien-mga akien-mga merged commit b31d00a into godotengine:master Mar 10, 2023
@akien-mga
Copy link
Member

Thanks!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panorama texture displays incorrectly in Procedural and Physical sky materials
3 participants